package com.atguigu.gmall.payment.service;

import com.atguigu.gmall.model.enums.PaymentType;
import com.atguigu.gmall.model.enums.PaymentWay;
import com.atguigu.gmall.model.order.OrderInfo;
import com.atguigu.gmall.model.payment.PaymentInfo;

import java.util.Map;

/**
 * @author atguigu-mqx
 */
public interface PaymentService {
    //  保存交易记录！
    void savePaymentInfo(OrderInfo orderInfo, String paymentType);

    //  查询交易记录
    PaymentInfo getPaymentInfo(String outTradeNo, String paymentType);

    //  支付成功
    void paySuccess(String outTradeNo, String paymentType, Map<String, String> paramMap);

    //  更新交易记录状态！
    void updatePaymentInfo(String outTradeNo, String paymentType, PaymentInfo paymentInfo);

    //  关闭交易记录
    void closePayment(Long orderId);
}
